<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>返利-商家表 编辑页面</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <jsp:include page="../com/header.jsp"></jsp:include>
        <script type="text/javascript" src="../../js/comm/editcomm.js"></script>
        <script type="text/javascript">
		$(function(){
			getDataById(root + 'cms/fanliBusiness/findFanliBusinessById',"#fanliBusinessTmpl","#fanliBusinessContent");
			$("#saveOrupdate").click(function(){
				$("#icon").val(imgUrl);
				saveData(root + 'cms/fanliBusiness/saveFanliBusiness','fanliBusinessList.jsp');
			});
			//上传图标
            $('#fanliBusinessContent').on('click','#uploadPhotoFile', function () {
				upload("fanliBusiness");
	        });
		});
        </script>
    </head>
    <body>
      <section>
          <div>
              <div class="col-xs-12">
                  <div class="box" style="height:900px">
                      <div class="box-header">
                      <br>
                          <input type="button" value="确定" id="saveOrupdate" class="btn btn-success">
                          <input type="button" value="返回"  onclick="backAction('fanliBusinessList.jsp');" class="btn btn-info"/>
                      </div>
                     <form id="submit_form" class="form-horizontal">
                        <div class="tab" id="fanliBusinessContent">
                  	    </div>
                  	 </form>
              </div>
          </div>
      </section>
      <script type="text/x-jsrender" id="fanliBusinessTmpl">
			<fieldset> 
				<input type="hidden" id="tId" name="id" value="{{:id}}" />
				<div class="form-group">
        			<label class="col-md-2 control-label controls" for="formGroupInputSmall">商家名称中文：</label>
       				 <div class="col-md-3">
						<input type="text" placeholder="请填写商家名称中文" class="form-control input-sm" data-rule="required;length[0~255]" id="businessName" name="businessName" value="{{:businessName}}" />
					</div>
      			</div>
				<div class="form-group">
        			<label class="col-md-2 control-label controls" for="formGroupInputSmall">商家名称英文：</label>
       				 <div class="col-md-3">
						<input type="text" placeholder="请填写商家名称英文" class="form-control input-sm" data-rule="required;length[0~255]" id="businessEnName" name="businessEnName" value="{{:businessEnName}}" />
					</div>
      			</div>
				<div class="form-group">
        			<label class="col-md-2 control-label controls" for="formGroupInputSmall">图标：</label>
					 <div class="col-md-3">
						<div class="upload_div">
                        	<img id="myImageShow" src="../../{{:icon}}" width="100px" height="100px" />
                        	<input type="hidden" id="icon" name="icon" value="{{:icon}}"/>
                        	<input type="file" id="uploadPhotoFile" name="photoFile" class="upload_file">
                        </div>
					</div>
      			</div>
				<div class="form-group">
        			<label class="col-md-2 control-label controls" for="formGroupInputSmall">口号：</label>
       				 <div class="col-md-3">
						<input type="text" placeholder="请填写口号" class="form-control input-sm" data-rule="required;length[0~255]" id="slogan" name="slogan" value="{{:slogan}}" />
					</div>
      			</div>
				<div class="form-group">
        			<label class="col-md-2 control-label controls" for="formGroupInputSmall">网站地址：</label>
       				 <div class="col-md-3">
						<input type="text" placeholder="请填写网站地址" class="form-control input-sm" data-rule="required;length[0~6000];url" id="website" name="website" value="{{:website}}" />
					</div>
      			</div>
				<div class="form-group">
        			<label class="col-md-2 control-label controls" for="formGroupInputSmall">请求返利信息的地址：</label>
       				 <div class="col-md-3">
						<input type="text" placeholder="请填写请求返利信息的地址" class="form-control input-sm" data-rule="required;length[0~6000];url" id="fanliConfirmUrl" name="fanliConfirmUrl" value="{{:fanliConfirmUrl}}" />
					</div>
      			</div>
			</fieldset>
	</script>
    </body>
</html>